Electrical devices with housings monitored by opening detectors are known. Such opening detectors are, among other things, used to register an unauthorized opening of the housing, and thus an unauthorized access to sensitive components of the electrical device and sensitive data. It is disruptive, however, to an operation of such electrical devices if an authorized opening of the housing, for example, for maintenance of individual components of the electrical device, always triggers an alarm.